using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace SailHero.Soft.FrameWork.Models.Mapping.AUTHCODEDBORA
{
    public class SYS_LOGMap : EntityTypeConfiguration<SYS_LOG>
    {
        public SYS_LOGMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.USERID)
                .HasMaxLength(50);

            this.Property(t => t.LOGCONTENT)
                .HasMaxLength(500);

            this.Property(t => t.URL)
                .HasMaxLength(100);

            this.Property(t => t.REMARK)
                .HasMaxLength(100);

            this.Property(t => t.ID)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("SYS_LOG", "LYHADMIN");
            this.Property(t => t.LOGID).HasColumnName("LOGID");
            this.Property(t => t.USERID).HasColumnName("USERID");
            this.Property(t => t.LOGCONTENT).HasColumnName("LOGCONTENT");
            this.Property(t => t.URL).HasColumnName("URL");
            this.Property(t => t.REMARK).HasColumnName("REMARK");
            this.Property(t => t.LOGDATE).HasColumnName("LOGDATE");
            this.Property(t => t.ID).HasColumnName("ID");
        }
    }
}
